<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <title>流程页</title> 
    <link href="${ctx}/static/css/base.css" rel="stylesheet">
    <link rel="stylesheet" href="${ctx}/static/css/uimaker/easyui.css">
    <link href="${ctx}/static/css/process.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="${ctx}/static/css/uimaker/icon.css">
	<style type="text/css">
		.error {
			color:red;
		}
	</style>
</head> 
<body>
      <div class="basic-info">
      	<table class="kv-table">
			<tbody>
				<tr>
					<td class="kv-label">订单号</td>
					<td class="kv-content">
						${order.orderId}
					</td>
					<td class="kv-label">商家名称</td>
					<td class="kv-content">
						${order.sellerName}
					</td>
				</tr>
				<tr>
					<td class="kv-label">车主姓名</td>
					<td class="kv-content">
						${order.name}
					</td>
					<td class="kv-label">车主手机号</td>
					<td class="kv-content">
						${order.phone}
					</td>
				</tr>
				<tr>
					<td class="kv-label">车型</td>
					<td class="kv-content">
						${order.carType}
					</td>
					<td class="kv-label">地址</td>
					<td class="kv-content">
						${order.address}
					</td>
				</tr>
				<tr>
					<td class="kv-label">安装产品</td>
					<td class="kv-content">
						${order.product}
					</td>
					<td class="kv-label">备注</td>
					<td class="kv-content">
						${order.remark}
					</td>
				</tr>
				<tr>
					<td class="kv-label">价格</td>
					<td class="kv-content">
						${order.price}
					</td>
					<td class="kv-label">创建人</td>
					<td class="kv-content">
						${order.createUname}
					</td>
				</tr>
				<tr>
					<td class="kv-label">创建时间</td>
					<td class="kv-content">
						<fmt:formatDate value="${order.createTime}" pattern="yyyy年MM月dd日 HH时mm分ss秒"/>
					</td>
					<td class="kv-label">订单状态</td>
					<td class="kv-content">
						<c:choose>
							<c:when test="${order.state eq 1}">
								新工单
							</c:when>
							<c:when test="${order.state eq 2}">
								待安装
							</c:when>
							<c:when test="${order.state eq 3}">
								订单结束
							</c:when>
							<c:otherwise>
								未知
							</c:otherwise>
						</c:choose>
						
					</td>
				</tr>
				<tr>
					<td class="kv-label">
						选择门店
					</td>
					<td class="kv-content" colspan="3">
						<select id="sheng" style="height:30px;width:100px;">
							<option value=''>请选择</option>
						</select>
						<select id="shi" style="height:30px;width:100px;">
							<option value=''>请选择</option>
						</select>
						<select id="xian" style="height:30px;width:100px;">
							<option value=''>请选择</option>
						</select>
						<a href="javascript:void()" class="easyui-linkbutton" data-options="selected:true">查询</a>
						<div>
							<input type="radio" name="storeId"/>店名：车管家  联系人：李先生 联系电话：13000000000 地址：安徽省合肥市蜀山区天鹅湖大酒店地下车库<br/>
							<input type="radio" name="storeId"/>店名：车管家  联系人：李先生 联系电话：13000000000 地址：安徽省合肥市蜀山区天鹅湖大酒店地下车库
						</div>
					</td>
				</tr>
				<tr>
					<td class="kv-label"></td>
					<td class="kv-content" colspan="3">
						<div class="opt-buttons">
							<a href="javascript:void();" class="easyui-linkbutton" data-options="selected:true">提交</a>
							<a href="javascript:history.back();" class="easyui-linkbutton">返回</a>
						</div>
					</td>
				</tr>
			</tbody>
		</table>
      </div>
</body>
<script type="text/javascript" src="${ctx}/static/js/jquery.js"></script>
<script type="text/javascript" src="${ctx}/static/js/jquery.easyui.min.js"></script>
<script type="text/javascript">
	$(function() {
		$.post('${ctx}/order/getregionsbyparid', {
			'parId':0
		}, function(data) {
			var $sheng = $('#sheng');
			$sheng.empty();
			$sheng.append("<option value=''>请选择</option>");
			for (var index in data) {
				$sheng.append("<option value='" + data[index].id + "'>" + data[index].label + "</option>");
			}
		}, 'json');
		
		$('#sheng').on('change', function() {
			var parId = $('#sheng').find('option:selected').val();
			var $shi = $('#shi');
			$shi.empty();
			$shi.append("<option value=''>请选择</option>");
			var $xian = $('#xian');
			$xian.empty();
			$xian.append("<option value=''>请选择</option>");
			$.post('${ctx}/order/getregionsbyparid', {
				'parId' : parId
			}, function(data) {
				for (var index in data) {
					$shi.append("<option value='" + data[index].id + "'>" + data[index].label + "</option>");
				}
			}, 'json');
			
		});
		
		$('#shi').on('change', function() {
			var parId = $('#shi').find('option:selected').val();
			var $xian = $('#xian');
			$xian.empty();
			$xian.append("<option value=''>请选择</option>");
			$.post('${ctx}/order/getregionsbyparid', {
				'parId' : parId
			}, function(data) {
				for (var index in data) {
					$xian.append("<option value='" + data[index].id + "'>" + data[index].label + "</option>");
				}
			}, 'json');
		});
		
	});

</script>
</html>


